package com.bhxx.fund.aspect;


import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LogAspect {


    private final static Logger logger = LoggerFactory.getLogger(LogAspect.class);

    // 以 controller 包下定义的所有请求为切入点
    @Pointcut("execution(public * com.bhxx.fund.task..*.*(..))")
    public void webLog() {}


    @After("webLog()")
    public void doAfter() throws Throwable {
        logger.info("=========================================== End ===========================================");
        // 每个请求之间空一行
        logger.info("");
    }
}
